﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hook.Primitives;
using Microsoft.Xna.Framework;
using Hook.Graphics;
using Hook.Graphics.SpriteSheets;

namespace Hook.Environmental.Props
{
    class Wheel : Prop
    {
        public Wheel()
            : base()
        {
            Sprite = new Sprite(Game1.PropSheet, PropSheet.WHEEL);

            List<Vector3> VO = new List<Vector3>();
            for(double a = 0; a < 2 * Math.PI; a += 2 * Math.PI / 8)
            {
                VO.Add(new Vector3((float)(250 * Math.Cos(a)), (float)(250 * Math.Sin(a)), 0));
            }
            Frame.SetPoints(VO);

            Mass = float.PositiveInfinity;
            Inertia = 5000;

            GravityOn = false;

            CollisionLayer.Add(1);
        }

        public Wheel(Vector3 Position, Vector3 Rotation)
            : this()
        {
            this.Position = Position;
            this.Rotation = Rotation;
        }
    }
}
